package org.gruposp2p.dnie.service;

import java.util.List;

import org.gruposp2p.dnie.model.DNIeDocumentToSign;
import org.gruposp2p.dnie.model.DNIeSignedDocument;
import org.gruposp2p.dnie.model.DNIeUser;

/**
 *
 * @author jj
 */
public interface DNIeSignedDocumentDAO {

    public DNIeSignedDocument findById(Integer id);

    public List<DNIeSignedDocument> findList(
    		DNIeDocumentToSign documentToSign, int firstResult, int maxResults);

    public DNIeSignedDocument save(DNIeSignedDocument document) ;

    public DNIeSignedDocument update(DNIeSignedDocument document);

    public boolean delete(Integer documentId) ;
    
    public DNIeSignedDocument findByUserAndDocumentToSign(
    		DNIeUser dnieUserId, DNIeDocumentToSign dnieDocumentToSignId);

    public int getNumberOfSignedItems (DNIeDocumentToSign dnieDocumentToSignId);
    
    public List<DNIeSignedDocument> findUserList(int firstResult, int maxResults, DNIeUser dnieUserId);

}
